<form onsubmit="return(add(this))" method="post" action="javascript:alert('表单没有验证!')">

<div class="bodytabdiv">
<table class='bodytab' cellspacing='1'>
<tr>
	<th class='th' colspan='2'>{-if $L.id-}修改{-else-}添加{-/if-}管理员资料</th>
</tr>

<tr>
	<td width='120'>管理员</td>
	<td><input name='name' value='{-$L.name-}' /></td>
</tr>

<tr>
	<td width='120'>管理组</td>
	<td>
		<select name="gid" {-if $L.id-} onchange ="return(false);"{-/if-} >{-foreach from=$G item=a-}
			<option value="{-$a.id-}" {-if $_GET.gid==$a.id-}style="color:red;" selected="selected"{-/if-}>{-$a.name-}</option>
		{-/foreach-}</select>
	</td>
</tr>


<tr>
	<td width='120'>密码</td>
	<td><input name='passwd' type="password" /></td>
</tr>



</table>
</div>


<input type='hidden' name='jurl' value='{-$_ENV.referer-}'>

<div class='bodysubmit'>
<input type='submit' value='递交'>
<input type='reset' value='默认'>
</div>

</form>

<div class='bodyfooter'>
	<a href='{-$_ENV.referer-}'>返回</a>
</div>

<script type="text/javascript">
var isp=false;
function add(f){
	if(isp) {alert('表单已经递交!');return false;}
	var e=f.elements['name'];	if(!e.value.match(/^([^\x00-\xff]|\w){1,15}$/)){
		alert('组名只不能为空,并且不能包含特殊字符!');	e.select();e.focus(); return false;
	}



	f.action="{-$body.url-}&act={-if $L.id-}eok&id={-$L.id-}{-else-}aok{-/if-}";
	isp=true;
	return true;
}
</script>